/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.service.materials;
import com.qinyetech.springstage.core.service.IBaseTreeableService;
import com.qinyeit.serviceapp.entity.MaterialCategory;

import java.util.List;

/** 
 * ClassName: MaterialCategoryService <br/> 
 * Function: 物品类别业务功能 <br/> 
 * date: 2018-11-07 11:40:01 <br/> 
 * 
 * @author liuwenjin
 * @version 1.0
 * @since JDK 1.8
 */
public interface MaterialCategoryService extends IBaseTreeableService<MaterialCategory, Long>{

    /**
     * 树形 过滤菜品库
     * @param merchantGroupId
     * @return
     */
    public List<MaterialCategory> getBuildTree(Long merchantGroupId,Long storeId);
    /**
     * 树形 过滤菜品库 并且过滤商品类别添加进来的
     * @param merchantGroupId
     * @param isDishesCategory 是否过滤从商品类别添加进来的
     * @return
     */
    public List<MaterialCategory> getBuildTree(Long merchantGroupId,Long storeId,boolean isDishesCategory);

    /**
     * 树形
     * @param merchantGroupId
     * @return
     */
    public List<MaterialCategory> getBuildTree(Long merchantGroupId);

    /**
     * 获取类别 删除的 或者 不删除的
     * @param merchantGroupId
     * @param deleted
     * @return
     */
    public List<MaterialCategory> getBuildTree(Long merchantGroupId,Boolean deleted);

    /**
     * 获取下一个编号
     * @param defNo
     * @param merchantGroupId
     * @return
     */
    String getNextNo(String defNo,Long merchantGroupId);

}